<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  //问题:箭头函数中的this是如何查找的？
  //答案:向外层作用域中，一层一层查找this，直到有this的定义
  const obj = {
    aaa(){
      setTimeout(function () { //Window
        console.log((this));
      }),
      setTimeout(()=>{
        console.log((this));//Object
      })
    }
  }
  obj.aaa()
</script>
</body>
</html>
